<%@ page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>hello world</title>
    <link rel="stylesheet" type="text/css" href="css/login.css">
    <script type="text/javascript" src="<%=request.getContextPath()%>/plugins/jquery-1.11.1.min.js"></script>
    <%
        String script_msg = (String) request.getAttribute("script_msg");
        String code = (String) request.getAttribute("code");
        if (code != null && code.equals("0")) {
            response.sendRedirect("index.jsp");
            return;
        }
        if (code != null && code.equals("-1")) {
            out.print(script_msg);
        }
    %>
</head>
<script type="text/javascript">
    function OnLoginSubmit() {
        var username = $("input[name=username]").val();
        if (!username) {
            alert("请输入用户名!");
            return false;
        }
        var password = $("input[name=password]").val();
        if (!password) {
            alert("请输入密码!");
            return false;
        }

        return true;
    }
</script>
<body style="height:98%;">
<FORM id=form1 onSubmit="javascript:return OnLoginSubmit();" method=post name=form1 action=user.do>
    <INPUT id=method name=method type=hidden value="login"/>

    <table width="100%" height="100%" border="0" cellspacing="0"
           cellpadding="0">
        <tr>
            <td>
                <table width="558" border="0" align="center" cellpadding="0"
                       cellspacing="0">
                    <tr>
                        <td height="170" class="login_logo">&nbsp;</td>
                    </tr>
                    <tr>
                        <td height="247">
                            <div class="login_user_wrap">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="82" height="247">&nbsp;</td>
                                        <td valign="top">
                                            <table width="286" border="0" align="center" cellpadding="0"
                                                   cellspacing="0">
                                                <tr>
                                                    <td height="58">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="login_input_txt">
                                                            <input name="username" type="text">
                                                        </div>
                                                        <div class="login_input_pwd">
                                                            <input name="password" type="password">
                                                        </div>
                                                        <div>
                                                            <input class="login_btn" type="submit" value="">
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>

                                        </td>
                                        <td width="82">&nbsp;</td>
                                    </tr>
                                </table>
                            </div>

                        </td>
                    </tr>
                    <tr>
                        <td height="115" class="login_copyright">© 上海辰锐信息科技有限公司</td>
                    </tr>
                </table>

            </td>
        </tr>
    </table>
</FORM>
</body>
</html>
